﻿using System;
using XWord.Fundamental.Domain;

namespace Luna.Common.Extensions
{
    public static class EntityExt
    {
        public static bool IsNew(this Entity entity)
        {
            return entity.Id == Guid.Empty;
        }

        public static bool IsNew<T>(this AbstractEntity<T> entity)
        {
            return entity.Id.Equals(default(T));
        }
    }
}
